package org.lex.swing.widgets;

public class JNotifyWindow {
	public enum Type {
		INFORMATION("information"), QUESTION("question"), WARNING("warning"), ERROR("error");

		private String key = null;

		private Type(String key) {
			this.key = "OptionPane." + key + "Icon";
		}

		public String getKey() {
			return this.key;
		}
	};

	public static void showWindow(String message) {
		new NotifyWindow(message).popup();
	}

	public static void showWindow(String message, Type messageType) {
		new NotifyWindow(message, messageType).popup();
	}

	public static void main(String[] args) {
		String message = getShortMessage();
		if (0 != args.length)
			message = getLongMessage();
		showWindow(message, Type.QUESTION);
	}

	protected static String getShortMessage() {
		return "JNotifyWindow Test";
	}

	protected static String getLongMessage() {
		return "JNotifyWindowTestJNotifyWindowTestJNotifyWindowTestJ" + "NotifyWindowTestJNotifyWindowTest#end";
	}
}
